#include "head.h"
#include "smg.h"
#include "xpt2046.h"


int main()
{
	float tmp=0;
	u16 tmp1=0;
	u8 buf1[3];
	while(1)
	{
		tmp1=xpt2046_read_adc_value(0x94);
		tmp=5.0*tmp1/4096;
		tmp1=tmp*10;
		buf1[0]=gsmg_code[tmp1/10]|0x80;
		buf1[1]=gsmg_code[tmp1%10];
		buf1[2]=0x3e;
		smg_display(buf1,6);		
	}
	return 0;
}